﻿#pragma once

#include "CastleGate.h"
#include "../../MirDatabase/MonsterInfo.h"
#include "../PlayerObject.h"
#include "../../../Shared/Enums.h"
#include "../MonsterObject.h"
#include <vector>
#include <cmath>
#include "../../../bankersrounding.h"

using namespace Server::MirDatabase;
using namespace Server::MirEnvir;
namespace S = ServerPackets;

namespace Server::MirObjects::Monsters
{
    class Gate : public CastleGate
    {
    protected:
        Gate(MonsterInfo *info);
    public:
        void Despawn() override;
        int Attacked(PlayerObject *attacker, int damage, DefenceType type = DefenceType::ACAgility, bool damageWeapon = true) override;

        int Attacked(MonsterObject *attacker, int damage, DefenceType type = DefenceType::ACAgility) override;

        void OpenDoor() override;

        void CheckDirection();

        void CloseDoor() override;

        void RepairGate() override;

    protected:
        int GetDamageLevel() override;

        bool getCanRegen() const override;
    };
}
